import { Injectable } from '@angular/core';
import { Hero } from './Hero'
import { HEROES } from './mock_heros'
import { HttpModule } from '@angular/http'
import { HttpClient, HttpHeaders, HttpHandler } from '@angular/common/http';
import { Observable } from 'rxjs/Observable';
@Injectable()
export class HeroService {
  private heroesUrl = 'abc?abc=1'
  constructor(
    private http: HttpClient) {
  }

  getHeros(): any {
    return this.http.get<Hero>(this.heroesUrl);
  }
  getMockData(): Hero[] {
    return HEROES;
  }
}
